<template>
  <div id="mydata-body">
    <header  class="mui-bar mui-bar-nav">
      <h1 class="mui-title">个人账户</h1>
      <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" @click="goBack"></a>
      
    </header>

    <div class="mydata-header mui-table-view">
      <a class="mui-navigate-right" @click="goMyData">
        <img class="mui-pull-left" v-bind:src="user_header" />
        
        <div class="mui-media-body">
          {{ user_name }}
          <p class="mui-ellipsis">{{ user_info }}</p>
        </div>
      </a>
    </div>
    <div class="mydata-commamd">
      <div class="mui-table-view-cell">
        <a class="mui-navigate-right">账号安全</a>
      </div>
      <div class="mui-table-view-cell">
        <a class="mui-navigate-right">个性装扮</a>
      </div>
      <div class="mui-table-view-cell">
        <a class="mui-navigate-right">隐私设置</a>
      </div>
      <div class="mui-table-view-cell">
        <a class="mui-navigate-right">系统设置</a>
      </div>
      <div class="mui-table-view-cell">
        <a class="mui-navigate-right">关于</a>
      </div>
    </div>
    <div class="mydata-commamd user-layout">
        <div class="mui-table-view-cell" @click="toLoyout">
        用户登出
      </div>
    </div>
  </div>
</template>

<script>
import Cookies from "js-cookie";
import { initLogin,layout } from '../assets/js/intercept';
export default {
  data() {
    return {
      user_name: "",
      user_info: "",
      user_header: ""
    };
  },
  methods: {
    goBack: function() {
      this.$router.go(-1);
    },
    goMyData : function(){
      this.$router.push({path : "/MyData"});
    },
    toLoyout : function(){
        layout();
        
    }
  },
  created: function() {
    var user = localStorage.getItem("Now_User");// Cookies.get("Now_User");
    user = JSON.parse(user);
    this.user_name = user.user_name;
    this.user_info = user.user_info;
    this.user_header = user.user_header;
  }
};
</script>
<style>
@import "../assets/css/mydata.css";
</style>